<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ include file="/commons/pages/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div class="subtitle">
  <h3>分摊域信息管理</h3>
</div>
<s:form action="BaseShareAreaInfo!list.action" method="post" id="query_form">
  <input type="hidden" name="selectBean.isAll" value="0" id="sb_isall"/>
  <table width="100%" border="0" cellpadding="5" cellspacing="0" class="subtbl">
    <tr>
      <td>分摊域名称：
        <input name="selectBean.area_name" type="text" class="webinput" size="20" value="<s:property value='selectBean.area_name'/>"/></td>
      <td>分摊域状态：
      	<select name="selectBean.area_state" dataType="Require" msg="请填写选择">
     		<option value="">请选择</option>
     		<option value="1" <s:if test="selectBean.area_state==1">selected="selected"</s:if>>未开工</option>
     		<option value="2" <s:if test="selectBean.area_state==2">selected="selected"</s:if>>施工</option>
     		<option value="3" <s:if test="selectBean.area_state==3">selected="selected"</s:if>>调试</option>
     		<option value="4" <s:if test="selectBean.area_state==4">selected="selected"</s:if>>服务</option>
     		<option value="5" <s:if test="selectBean.area_state==5">selected="selected"</s:if>>自管</option>
	 	</select> 
      </td>
      <td>所属项目：
      	<select name="selectBean.proj_id">
      		<option value="">--==请选择==--</option>
      		<s:iterator value="projList" var="cur">
      			 <option value="<s:property value='#cur.ID'/>" <s:if test="selectBean.proj_id==#cur.ID">selected="selected"</s:if>><s:property value="#cur.PROJ_NAME"/></option>
      		</s:iterator>
      	</select>
      </td>
    </tr>
    <tr>
      <td><input name="button2" type="submit" class="websub" id="button2" value="查 询" />
        <input name="button_query_all" type="button" class="websub"  id="button3" value="查询全部" onclick="javascript:queryAll()"/></td>
    </tr>
  </table>
  <table width="100%" border="0" cellpadding="5" cellspacing="1" class="tbl_list">
  <s:if test="#session.management.userRole==1 || #session.management.userRole==3">
    <tr>
      <td align="right" colspan="5"><input name="button2" type="button" class="websub" onclick="location.href='BaseShareAreaInfo!add.action'" value="添加" /></td>
    </tr>
    </s:if>
    <tr>
      <th width="6%">序号</th>
      <th width="32%">分摊域名称</th>
      <th width="10%">分摊域状态</th>
      <th width="37%">所属项目</th>
      <th width="15%">操作</th>
    </tr>
    <s:iterator value="list" var="cur" status="vs">
      <tr align="center">
        <td><abean:counter write="true" /></td>
        <td><s:property value="#cur.AREA_NAME"/></td>
        <td>
        	<s:if test="#cur.AREA_STATE==1">未开工</s:if>
	     	<s:if test="#cur.AREA_STATE==2">施工</s:if>
	     	<s:if test="#cur.AREA_STATE==3">调试</s:if>
	     	<s:if test="#cur.AREA_STATE==4">服务</s:if>
	     	<s:if test="#cur.AREA_STATE==5">自管</s:if>
        </td>
        <td><s:property value="#cur.PROJ_NAME"/></td>
        <td><a href="BaseShareAreaInfo!view.action?id=<s:property value='#cur.ID'/>">查看</a> 
        <s:if test="#session.management.userRole==1 || #session.management.userRole==3">
        <a href="BaseShareAreaInfo!edit.action?id=<s:property value='#cur.ID'/>">修改</a> <a href="javascript:if(confirm('您确定要删除吗？')){location.href='BaseShareAreaInfo!delete.action?id=<s:property value='#cur.ID'/>';}">删除</a>
        </s:if>
        </td>
      </tr>
    </s:iterator>
    <abean:tablefill name="BaseShareAreaInfo" property="selectBean.pager" column="5"/>
  </table>
  <div id="showpage">
    <ahtml:pagination name="BaseShareAreaInfo" method="list" showsize="false" property="selectBean.pager"/>
  </div>
</s:form>
<script type="text/javascript">
function queryAll(){
	document.getElementById('sb_isall').value=1;
	document.forms["query_form"].submit();
}
</script>
</body>
</html>
